Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 20, 2025

βœ… Checklist

  • πŸ§ͺ The component is unit tested
  • πŸ§ͺ The component includes E2E tests
  • πŸ—‘οΈ Old Cypress tests exclusive to the component are removed (none existed)
  • πŸ“– The component is documented in storybook with an .mdx file
  • β™Ώ The component complies with the Web Content Accessibility Guidelines.
  • 🌐 All strings intended for humans or assistive technology must be localized with i18n.
  • πŸ“¦ The Lit component is exported in the appropriate index.ts and lazy-index.ts files.
  • 🎨 CSS parts are documented still accessible.
  • πŸ¦₯ Slotted Content, public methods and properties are documented
  • πŸ”„ The component outputs the same Angular output as before with Stencil
  • 🏷️ The component declares the component type in the HTMLElementTagNameMap

https://coveord.atlassian.net/browse/KIT-5050

Description

Migrates atomic-result-children from Stencil to Lit, preserving all functionality for displaying child results with template inheritance support.

Key Changes

New Reactive Controller

  • Created FoldedItemListContextController to manage folded result list state via custom events and subscriptions
  • Mirrors pattern established by other context controllers (ItemContextController, ChildTemplatesContextController)

Component Migration

  • Converted Stencil @Component β†’ Lit @customElement with proper decorators
  • Replaced Stencil context decorators with Lit reactive controllers:
    • @ResultContext β†’ createResultContextController
    • @FoldedItemListContext β†’ FoldedItemListContextController
    • @ItemDisplayConfigContext β†’ ItemDisplayConfigContextController
    • @ChildTemplatesContext β†’ ChildTemplatesContextController
  • Migrated lifecycle: componentWillRender β†’ willUpdate, event listeners in connectedCallback/disconnectedCallback
  • All imports converted to @/* path aliases

Functional Components

  • Leverages existing Lit functional components:
    • renderResultChildrenGuard
    • renderChildrenWrapper
    • renderCollectionGuard
    • renderShowHideButton

Remaining Work

  • E2E tests (generated boilerplate exists)
  • Storybook stories with MSW mocking
  • MDX documentation
  • Export updates in index files
  • Full build verification

Testing

Unit tests cover prop validation, error handling for missing templates, and template inheritance behavior.

Original prompt

This section details on the original issue you should resolve

<issue_title>Migrate atomic-result-children</issue_title>
<issue_description>

Jira Issue: KIT-5050

Type: User Story
Status: New
Priority: Medium


Comments on the Issue (you are @copilot in this section)

Custom agent used: stencil-to-lit-migration-agent
Specialized agent for migrating Atomic Stencil code to Lit (components, functional components, and utils)


πŸ’¬ We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI changed the title [WIP] Migrate atomic result children feat(atomic): migrate atomic-result-children to Lit Nov 20, 2025
Copilot finished work on behalf of alexprudhomme November 20, 2025 18:20
Copilot AI requested a review from alexprudhomme November 20, 2025 18:20
@github-actions
Copy link

πŸ”— Scratch Orgs ready to test this PR:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate atomic-result-children

2 participants